def move(n, source, target, auxiliary):
    if n > 0:

        move(n - 1, source, auxiliary, target)


        print(f"Move disk {n} from {source} to {target}")


        move(n - 1, auxiliary, target, source)




move(3, 'A', 'C', 'B')